<html>
<head><meta charset="utf-8"><title>Adding linker flags from build.rs · t-cargo · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/index.html">t-cargo</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Adding.20linker.20flags.20from.20build.2Ers.html">Adding linker flags from build.rs</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="216754513"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Adding%20linker%20flags%20from%20build.rs/near/216754513" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Adding.20linker.20flags.20from.20build.2Ers.html#216754513">(Nov 14 2020 at 22:46)</a>:</h4>
<p>As discussed in <a href="https://github.com/rust-lang/cargo/issues/7984">https://github.com/rust-lang/cargo/issues/7984</a>, it would be very useful for the embedded ecosystem if <a href="http://build.rs">build.rs</a> had the capability to pass a linker script to the linker. Is this something that would be reasonable to allow? If so, is there any preference for how the support should look?</p>
<p>It seems that <code>rustc-flags</code> is deliberately limited to <code>-l</code> and <code>-L</code>, which I think only affect linked artifacts, so would it make sense to allow <code>-Clink-arg</code>/<code>-Clink-args</code> there too?</p>



<a name="216754764"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Adding%20linker%20flags%20from%20build.rs/near/216754764" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Adding.20linker.20flags.20from.20build.2Ers.html#216754764">(Nov 14 2020 at 22:50)</a>:</h4>
<p><span class="user-mention" data-user-id="211727">@Jonas Schievink</span> linker scripts are once per link, right? That is we would not expect more than one library to provide this?</p>



<a name="216754772"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Adding%20linker%20flags%20from%20build.rs/near/216754772" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Adding.20linker.20flags.20from.20build.2Ers.html#216754772">(Nov 14 2020 at 22:50)</a>:</h4>
<p>It also seems like you'd want to detect the linker being used for this to work well...</p>



<a name="216754776"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Adding%20linker%20flags%20from%20build.rs/near/216754776" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Adding.20linker.20flags.20from.20build.2Ers.html#216754776">(Nov 14 2020 at 22:51)</a>:</h4>
<p>There can be arbitrarily many linker scripts</p>



<a name="216754808"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Adding%20linker%20flags%20from%20build.rs/near/216754808" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Adding.20linker.20flags.20from.20build.2Ers.html#216754808">(Nov 14 2020 at 22:51)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116122">simulacrum</span> <a href="#narrow/stream/246057-t-cargo/topic/Adding.20linker.20flags.20from.20build.2Ers/near/216754772">said</a>:</p>
<blockquote>
<p>It also seems like you'd want to detect the linker being used for this to work well...</p>
</blockquote>
<p>Yeah, while we do only use GNU LD compatible linkers, they can be used directly, or via a GCC wrapper, which takes different arguments.</p>



<a name="216754934"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Adding%20linker%20flags%20from%20build.rs/near/216754934" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Adding.20linker.20flags.20from.20build.2Ers.html#216754934">(Nov 14 2020 at 22:53)</a>:</h4>
<p>Ok. I think general link argument  is very flexible so maybe limiting to just linker script would make sense? But it seems reasonable to me to allow this - it sounds like linker scripts are not all that different from linked libraries from a build system perspective</p>



<a name="216754991"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Adding%20linker%20flags%20from%20build.rs/near/216754991" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Adding.20linker.20flags.20from.20build.2Ers.html#216754991">(Nov 14 2020 at 22:54)</a>:</h4>
<p>Yeah that would work</p>



<a name="216754996"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Adding%20linker%20flags%20from%20build.rs/near/216754996" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Adding.20linker.20flags.20from.20build.2Ers.html#216754996">(Nov 14 2020 at 22:54)</a>:</h4>
<p>Does Cargo know the linker in use?</p>



<a name="216755251"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Adding%20linker%20flags%20from%20build.rs/near/216755251" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Adding.20linker.20flags.20from.20build.2Ers.html#216755251">(Nov 14 2020 at 23:01)</a>:</h4>
<p><span class="user-mention" data-user-id="211727">@Jonas Schievink</span> Would arbitrary rustc flags be good enough?  It doesn't help if you want a library to define a linker script, but you could have a build-dependency that generates the script?</p>



<a name="216755256"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Adding%20linker%20flags%20from%20build.rs/near/216755256" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Adding.20linker.20flags.20from.20build.2Ers.html#216755256">(Nov 14 2020 at 23:01)</a>:</h4>
<p>Hmm, so you mean a dependency's build script could not pass the flag?</p>



<a name="216755296"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Adding%20linker%20flags%20from%20build.rs/near/216755296" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Adding.20linker.20flags.20from.20build.2Ers.html#216755296">(Nov 14 2020 at 23:02)</a>:</h4>
<p>Right, the flags only apply to the package.</p>



<a name="216755326"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Adding%20linker%20flags%20from%20build.rs/near/216755326" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Adding.20linker.20flags.20from.20build.2Ers.html#216755326">(Nov 14 2020 at 23:03)</a>:</h4>
<p>What I'd like to get rid of is the currently mandatory <code>.cargo/config</code> that specifies linker flags</p>



<a name="216755333"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Adding%20linker%20flags%20from%20build.rs/near/216755333" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Adding.20linker.20flags.20from.20build.2Ers.html#216755333">(Nov 14 2020 at 23:03)</a>:</h4>
<p>Actually I forgot that we don't just have build scripts</p>



<a name="216755343"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Adding%20linker%20flags%20from%20build.rs/near/216755343" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Adding.20linker.20flags.20from.20build.2Ers.html#216755343">(Nov 14 2020 at 23:03)</a>:</h4>
<p>We also have to <em>always</em> pass <code>--nmagic</code> to the linker, for cursed reasons</p>



<a name="216755344"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Adding%20linker%20flags%20from%20build.rs/near/216755344" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Adding.20linker.20flags.20from.20build.2Ers.html#216755344">(Nov 14 2020 at 23:03)</a>:</h4>
<p>So we would need more than just linker script support</p>



<a name="216755390"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Adding%20linker%20flags%20from%20build.rs/near/216755390" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Adding.20linker.20flags.20from.20build.2Ers.html#216755390">(Nov 14 2020 at 23:04)</a>:</h4>
<p>I'm just thinking if <a href="https://github.com/rust-lang/cargo/pull/8441">https://github.com/rust-lang/cargo/pull/8441</a> might help you.  That would allow you to have a build script pass the args instead of <code>.cargo/config</code>.  I'm not sure if that's much better, but maybe if it uses a build-dependency that could hide most of the complexity?</p>



<a name="216755399"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Adding%20linker%20flags%20from%20build.rs/near/216755399" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Adding.20linker.20flags.20from.20build.2Ers.html#216755399">(Nov 14 2020 at 23:05)</a>:</h4>
<p>Cargo doesn't know anything about the linker in use or the linking phase, only <code>rustc</code> knows about it.</p>



<a name="216755518"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Adding%20linker%20flags%20from%20build.rs/near/216755518" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Adding.20linker.20flags.20from.20build.2Ers.html#216755518">(Nov 14 2020 at 23:09)</a>:</h4>
<p>Hmm, I see, that might help a bit I suppose</p>



<a name="216755562"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Adding%20linker%20flags%20from%20build.rs/near/216755562" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Adding.20linker.20flags.20from.20build.2Ers.html#216755562">(Nov 14 2020 at 23:10)</a>:</h4>
<p>So <code>rustc-cdylib-link-arg</code> is also ignored if it comes from dependencies instead of being accumulated?</p>



<a name="216755653"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Adding%20linker%20flags%20from%20build.rs/near/216755653" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Adding.20linker.20flags.20from.20build.2Ers.html#216755653">(Nov 14 2020 at 23:13)</a>:</h4>
<p><span class="user-mention silent" data-user-id="211727">Jonas Schievink</span> <a href="#narrow/stream/246057-t-cargo/topic/Adding.20linker.20flags.20from.20build.2Ers/near/216755343">said</a>:</p>
<blockquote>
<p>We also have to <em>always</em> pass <code>--nmagic</code> to the linker, for cursed reasons</p>
</blockquote>
<p>I'm aware of that one too, and I'd like that as well.</p>



<a name="216755654"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Adding%20linker%20flags%20from%20build.rs/near/216755654" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Adding.20linker.20flags.20from.20build.2Ers.html#216755654">(Nov 14 2020 at 23:13)</a>:</h4>
<p>Right, it is not accumulated.</p>



<a name="216755697"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Adding%20linker%20flags%20from%20build.rs/near/216755697" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Adding.20linker.20flags.20from.20build.2Ers.html#216755697">(Nov 14 2020 at 23:14)</a>:</h4>
<p>If not for the fact that there are <em>sometimes</em> reasons to want sections aligned, we could just always pass <code>--nmagic</code> when linking statically.</p>



<a name="216755701"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Adding%20linker%20flags%20from%20build.rs/near/216755701" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Adding.20linker.20flags.20from.20build.2Ers.html#216755701">(Nov 14 2020 at 23:14)</a>:</h4>
<p>Unfortunately, I don't think we can do that. :(</p>



<a name="217494629"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Adding%20linker%20flags%20from%20build.rs/near/217494629" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Luca Barbato <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Adding.20linker.20flags.20from.20build.2Ers.html#217494629">(Nov 21 2020 at 10:02)</a>:</h4>
<p><span class="user-mention" data-user-id="211727">@Jonas Schievink</span> rustc-cdylib-link-arg has many restrictions (and some could be relaxed) but it applies only to the main crate, if you want to apply it to the dependencies you might be better off using <code>RUSTFLAGS</code>.</p>



<a name="217497587"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Adding%20linker%20flags%20from%20build.rs/near/217497587" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Adding.20linker.20flags.20from.20build.2Ers.html#217497587">(Nov 21 2020 at 11:23)</a>:</h4>
<p>That's not an option, we can't require every user to set that</p>



<a name="217498391"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Adding%20linker%20flags%20from%20build.rs/near/217498391" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Luca Barbato <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Adding.20linker.20flags.20from.20build.2Ers.html#217498391">(Nov 21 2020 at 11:47)</a>:</h4>
<p>I do not see how adding something to <a href="http://build.rs">build.rs</a> would impact something outside its crate =/</p>



<a name="217498572"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Adding%20linker%20flags%20from%20build.rs/near/217498572" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Luca Barbato <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Adding.20linker.20flags.20from.20build.2Ers.html#217498572">(Nov 21 2020 at 11:52)</a>:</h4>
<p>Would be nicer to extend the amount of overrides you can put in <code>.cargo/config</code> IMHO</p>



<a name="218356804"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Adding%20linker%20flags%20from%20build.rs/near/218356804" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Adding.20linker.20flags.20from.20build.2Ers.html#218356804">(Nov 30 2020 at 22:39)</a>:</h4>
<p>We have just realized that our linker script scheme falls apart when not cross-compiling, since Cargo apparently has no way to configure rustc flags for only the main binary, and not build scripts</p>



<a name="218356892"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Adding%20linker%20flags%20from%20build.rs/near/218356892" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Adding.20linker.20flags.20from.20build.2Ers.html#218356892">(Nov 30 2020 at 22:40)</a>:</h4>
<p>That means that when we aren't cross-compiling, the linker script ends up getting passed to every single rustc invocation, including those that build build scripts, and that breaks since we don't expect it</p>



<a name="218356932"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Adding%20linker%20flags%20from%20build.rs/near/218356932" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Adding.20linker.20flags.20from.20build.2Ers.html#218356932">(Nov 30 2020 at 22:41)</a>:</h4>
<p>When cross-compiling, the rustflags only apply to crates that are actually needed on the target, which is exactly what we want</p>



<a name="218358534"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Adding%20linker%20flags%20from%20build.rs/near/218358534" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Adding.20linker.20flags.20from.20build.2Ers.html#218358534">(Nov 30 2020 at 22:58)</a>:</h4>
<p><span class="user-mention" data-user-id="211727">@Jonas Schievink</span> I have an awful hack for you: pass <code>--target &lt;host&gt;</code>, where &lt;host&gt; is the platform you're currently on</p>



<a name="218358710"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Adding%20linker%20flags%20from%20build.rs/near/218358710" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Adding.20linker.20flags.20from.20build.2Ers.html#218358710">(Nov 30 2020 at 23:00)</a>:</h4>
<p>Apparently that still passes rustflags to build scripts</p>



<a name="218359190"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Adding%20linker%20flags%20from%20build.rs/near/218359190" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Adding.20linker.20flags.20from.20build.2Ers.html#218359190">(Nov 30 2020 at 23:05)</a>:</h4>
<p>that's weird, it doesn't pass rustdocflags <a href="https://github.com/rust-lang/cargo/issues/7677#issuecomment-572303070">https://github.com/rust-lang/cargo/issues/7677#issuecomment-572303070</a></p>



<a name="218359252"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Adding%20linker%20flags%20from%20build.rs/near/218359252" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Adding.20linker.20flags.20from.20build.2Ers.html#218359252">(Nov 30 2020 at 23:06)</a>:</h4>
<p>maybe that's specific to proc-macros</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>